#include <stdio.h>
#include <math.h>
#define pi 3.1415926
int main(){
    float a,x,y;
    scanf("%f%f",&a,&x);
    y=fabs(cos(pi*x/2))+sin(x)/(a*x);
    printf("%.3f",y);
    return 0;
}
